<template>
  <div>
    <p v-for="i in size" :index="i">i</p>
    <div class="mainPage">
      <Paper
          :total="total"
          :allPage="allPage"
          v-on:change="changePage"
      ></Paper>
    </div>
  </div>

</template>


<script>

import Paper from "@/components/Paper"

export default {

  name: 'user',

  components: {
    Paper
  },

  data() {
    return {
      userList: [],
      allPage: 0,  //总页数
      size: 10,   //每页显示个数
      current: 1,   //当前显示页
      total: 0   //总数
    }

  },

  created: function () {
    this.allPage = 50

    //钩子函数，在页面加载完毕前执行
    this.getList();
  },

  methods: {
    //获取用户列表
    getList: function () {},

    // 切换页面
    changePage: function (index) {
      this.current = index;
      this.getList();
    }

  }

}

</script>


<style scoped>

.form-group {
  overflow: hidden;
}

.control-label {
  padding-left: 0;
  padding-right: 0;
}

</style>